<template>
  <div id="app">
      <button @click="loadData">点击发送</button>
  </div>
</template>

<script>

import { getData } from '@/utils/api'
export default {
  name: 'App',
  data() {
    return {
      page: 0
    }
  },
  methods: {
    loadData() {
      this.page ++
      this.getData()
    },
    getData() {
      getData({ page: this.page }).then(res => {
        console.log('success', res)
      }).catch(err => {
        console.log('err', err)
      })
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
